<div class="easyui-layout" data-options="fit:true">
    <div data-options="region:'north'" class="center">
        <div class="webmap">
            <p class="webmaptip">当前位置:</p>
            <a href="javascript:goHome();" class="easyui-link">我的工作台</a>
            <p class="webmaptip">></p>
            <a href="javascript:;" class="easyui-link">所有用户</a>
            <p class="webmaptip">></p>
            <a href="javascript:;" class="easyui-link">媒体管理</a>
        </div>

        <div class="querybycon">
            <form id="query">
                <div class="queryinfo">
                    <div> 标题<input type="text" name="name"></div>
                    <div> 状态 <input class="easyui-combobox" name="showPlatform"
                                    data-options="url:'/dictionary/plantfrom'"></div>
                    <div class="query">
                        <a id="querybtn" href="javascript:;" class="easyui-linkbutton  "
                           data-options="iconCls:'fa fa-search'"></a>
                    </div>
                </div>
            </form>
        </div>

        <div class="querybtn">
            <a id="add" href="javascript:;" class="easyui-linkbutton  warning"
               data-options="iconCls:'fa fa-plus'">添加</a>
            <a id="edit" href="javascript:;" class="easyui-linkbutton danger"
               data-options="iconCls:'fa fa-pencil'">编辑</a>
            <a id="del" href="javascript:;" class="easyui-linkbutton success"
               data-options="iconCls:'fa fa-remove'">删除</a>
            <a id="detail" href="javascript:;" class="easyui-linkbutton success"
               data-options="iconCls:'fa fa-search'">查看</a>
            <div style="visibility: hidden;">aa</div>
        </div>
    </div>

    <div data-options="region:'center'">
        <table id="list"></table>
    </div>
</div>

<script type="text/javascript">

    var addUrl = "page/banner/banneradd.html";
    var editUrl = "page/banner/banneredit.html";
    var detailUrl = "page/banner/bannerinfo.html";
    var delUrl = '/banner/del';
    var save = '/banner/save';
    var listUrl = "/banner/list";
    var edit = "/banner/edit";
    var detail = "/banner/edit";
    var columns = [[{
        field: 'id',
        checkbox: true
    }, {
        field: 'name',
        title: '标题',
    }, {
        field: 'showPlatform',
        title: '平台类型',
        formatter: function (value, row, index) {
            if (value == null) {
                return '';
            }
            var platformDic = [];
            platformDic["1"] = "PC";
            platformDic["2"] = "H5";
            platformDic["3"] = "APP";
            var txt = [];
            var values = value.split(",");
            for (i in values) {
                txt.push(platformDic[values[i]]);
            }
            return txt.join(",");
        }
    }, {
        field: 'link',
        title: '链接',
    }, {
        field: 'beginTime',
        title: '有效开始日期',
    }, {
        field: 'endTime',
        title: '有效结束日期',
    }]];
    list.init({url: listUrl, columns: columns});
</script>
